<?php
// +----------------------------------------------------------------------
// | braingoing [ WE CAN DO IT MORE SIMPLE ]  自定义函数库
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.zsb888.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: zsb <807098383@qq.com>
// +----------------------------------------------------------------------

/**
 * braingoing密码加密方法
 * @param string $pw 要加密的字符串
 * @return string
 */
function bg_password($pw,$authcode=''){
    if(empty($authcode)){
        $authcode=config('passcode');
    }
    $result="###".md5(md5($authcode.$pw));
    return $result;
}